/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import java.util.ArrayList;
import java.util.function.Function;
import java.util.function.BiFunction;
class EarleyBoyer {
    public static final int EARLEYBOYER_2 = 2;
    public static final int EARLEYBOYER_3 = 3;
    public static final int EARLEYBOYER_4 = 4;
    public static final int EARLEYBOYER_5 = 5;
    public static final int EARLEYBOYER_6 = 6;
    public static final int EARLEYBOYER_7 = 7;
    public static final int EARLEYBOYER_120 = 20;
    public static final int EARLEYBOYER_132 = 132;
    public static final double EARLEYBOYER_1000 = 1000;
    public static final int EARLEYBOYER_95024 = 95024;

    public static class ScPair {
        public Object car;
        public Object cdr;
        ScPair(
                Object car,
                Object cdr)
        {
            this.car = car;
            this.cdr = cdr;
        }

    }

    public static class ScNull {
        ScNull() {}
    }

    public static ScPair scConst4Nboyer = new ScPair(
            "\u1E9Cimplies",
            new ScPair(
                    new ScPair(
                            "\u1E9Cand",
                            new ScPair(
                                    new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Cand",
                                                    new ScPair(
                                                            new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))),
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cand",
                                                                            new ScPair(
                                                                                    new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cz", new ScPair("\u1E9Cu", new ScNull()))),
                                                                                    new ScPair(new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cu", new ScPair("\u1E9Cw", new ScNull()))), new ScNull())
                                                                            )
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            ),
                                            new ScNull()
                                    )
                            )
                    ),
                    new ScPair(new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cx", new ScPair("\u1E9Cw", new ScNull()))), new ScNull())
            )
    );
    public static ScPair scConst3Nboyer = (ScPair) scList(
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ccompile", new ScPair("\u1E9Cform", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Creverse",
                                            new ScPair(
                                                    new ScPair(
                                                            "\u1E9Ccodegen",
                                                            new ScPair(
                                                                    new ScPair("\u1E9Coptimize", new ScPair("\u1E9Cform", new ScNull())),
                                                                    new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull())
                                                            )
                                                    ),
                                                    new ScNull()
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ceqp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cequal",
                                            new ScPair(
                                                    new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cgreaterp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Clesseqp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cgreatereqp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cboolean", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cor",
                                            new ScPair(
                                                    new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ciff", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ceven1", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(
                                                            new ScPair("\u1E9Ct", new ScNull()),
                                                            new ScPair(new ScPair("\u1E9Codd", new ScPair(new ScPair("\u1E9Csub1", new ScPair("\u1E9Cx", new ScNull())), new ScNull())), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ccountps-", new ScPair("\u1E9Cl", new ScPair("\u1E9Cpred", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ccountps-loop",
                                            new ScPair("\u1E9Cl", new ScPair("\u1E9Cpred", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cfact-", new ScPair("\u1E9Ci", new ScNull())),
                            new ScPair(new ScPair("\u1E9Cfact-loop", new ScPair("\u1E9Ci", new ScPair(1, new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Creverse-", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(new ScPair("\u1E9Creverse-loop", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cdivides", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair("\u1E9Czerop", new ScPair(new ScPair("\u1E9Cremainder", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cassume-true", new ScPair("\u1E9Cvar", new ScPair("\u1E9Calist", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ccons",
                                            new ScPair(
                                                    new ScPair("\u1E9Ccons", new ScPair("\u1E9Cvar", new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScNull()))),
                                                    new ScPair("\u1E9Calist", new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cassume-false", new ScPair("\u1E9Cvar", new ScPair("\u1E9Calist", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ccons",
                                            new ScPair(
                                                    new ScPair("\u1E9Ccons", new ScPair("\u1E9Cvar", new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScNull()))),
                                                    new ScPair("\u1E9Calist", new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ctautology-checker", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ctautologyp",
                                            new ScPair(new ScPair("\u1E9Cnormalize", new ScPair("\u1E9Cx", new ScNull())), new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cfalsify", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cfalsify1",
                                            new ScPair(new ScPair("\u1E9Cnormalize", new ScPair("\u1E9Cx", new ScNull())), new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cprime", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cnot",
                                                                    new ScPair(
                                                                            new ScPair(
                                                                                    "\u1E9Cequal",
                                                                                    new ScPair(
                                                                                            "\u1E9Cx",
                                                                                            new ScPair(new ScPair("\u1E9Cadd1", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())), new ScNull())
                                                                                    )
                                                                            ),
                                                                            new ScNull()
                                                                    )
                                                            ),
                                                            new ScPair(
                                                                    new ScPair("\u1E9Cprime1", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Csub1", new ScPair("\u1E9Cx", new ScNull())), new ScNull()))),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cand", new ScPair("\u1E9Cp", new ScPair("\u1E9Cq", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    "\u1E9Cp",
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cif",
                                                                    new ScPair("\u1E9Cq", new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScNull())))
                                                            ),
                                                            new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cor", new ScPair("\u1E9Cp", new ScPair("\u1E9Cq", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    "\u1E9Cp",
                                                    new ScPair(
                                                            new ScPair("\u1E9Ct", new ScNull()),
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cif",
                                                                            new ScPair("\u1E9Cq", new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScNull())))
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cnot", new ScPair("\u1E9Cp", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair("\u1E9Cp", new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScNull())))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cimplies", new ScPair("\u1E9Cp", new ScPair("\u1E9Cq", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    "\u1E9Cp",
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cif",
                                                                    new ScPair("\u1E9Cq", new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScNull())))
                                                            ),
                                                            new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cif",
                                    new ScPair(
                                            new ScPair("\u1E9Cif", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScPair("\u1E9Cc", new ScNull())))),
                                            new ScPair("\u1E9Cd", new ScPair("\u1E9Ce", new ScNull()))
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    "\u1E9Ca",
                                                    new ScPair(
                                                            new ScPair("\u1E9Cif", new ScPair("\u1E9Cb", new ScPair("\u1E9Cd", new ScPair("\u1E9Ce", new ScNull())))),
                                                            new ScPair(new ScPair("\u1E9Cif", new ScPair("\u1E9Cc", new ScPair("\u1E9Cd", new ScPair("\u1E9Ce", new ScNull())))), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Czerop", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cor",
                                            new ScPair(
                                                    new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cx", new ScNull())), new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cplus",
                                    new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cz", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Ca", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cb", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cx", new ScPair("\u1E9Cx", new ScNull()))),
                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Ca", new ScPair("\u1E9Cc", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cequal",
                                            new ScPair(
                                                    new ScPair("\u1E9Cfix", new ScPair("\u1E9Cb", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cc", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Czero", new ScNull()),
                                            new ScPair(new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cor",
                                                                    new ScPair(
                                                                            new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))),
                                                                            new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                                                                    )
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cmeaning",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus-tree", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                                            new ScPair("\u1E9Ca", new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair(
                                                    new ScPair(
                                                            "\u1E9Cmeaning",
                                                            new ScPair(new ScPair("\u1E9Cplus-tree", new ScPair("\u1E9Cx", new ScNull())), new ScPair("\u1E9Ca", new ScNull()))
                                                    ),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cmeaning",
                                                                    new ScPair(new ScPair("\u1E9Cplus-tree", new ScPair("\u1E9Cy", new ScNull())), new ScPair("\u1E9Ca", new ScNull()))
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cmeaning",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus-tree", new ScPair(new ScPair("\u1E9Cplus-fringe", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                            new ScPair("\u1E9Ca", new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair("\u1E9Cfix", new ScPair(new ScPair("\u1E9Cmeaning", new ScPair("\u1E9Cx", new ScPair("\u1E9Ca", new ScNull()))), new ScNull())),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cappend",
                                    new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cz", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cappend",
                                            new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Creverse", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))), new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cappend",
                                            new ScPair(
                                                    new ScPair("\u1E9Creverse", new ScPair("\u1E9Cb", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Creverse", new ScPair("\u1E9Ca", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Ctimes",
                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair(
                                                    new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Ctimes",
                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cz", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ctimes",
                                            new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cor",
                                            new ScPair(
                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cexec",
                                    new ScPair(
                                            new ScPair("\u1E9Cappend", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair("\u1E9Cpds", new ScPair("\u1E9Cenvrn", new ScNull()))
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cexec",
                                            new ScPair(
                                                    "\u1E9Cy",
                                                    new ScPair(
                                                            new ScPair("\u1E9Cexec", new ScPair("\u1E9Cx", new ScPair("\u1E9Cpds", new ScPair("\u1E9Cenvrn", new ScNull())))),
                                                            new ScPair("\u1E9Cenvrn", new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cmc-flatten", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair("\u1E9Cappend", new ScPair(new ScPair("\u1E9Cflatten", new ScPair("\u1E9Cx", new ScNull())), new ScPair("\u1E9Cy", new ScNull()))),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cmember",
                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cor",
                                            new ScPair(
                                                    new ScPair("\u1E9Cmember", new ScPair("\u1E9Cx", new ScPair("\u1E9Ca", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cmember", new ScPair("\u1E9Cx", new ScPair("\u1E9Cb", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cmember", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Creverse", new ScPair("\u1E9Cy", new ScNull())), new ScNull()))),
                            new ScPair(new ScPair("\u1E9Cmember", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Clength", new ScPair(new ScPair("\u1E9Creverse", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                            new ScPair(new ScPair("\u1E9Clength", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cmember",
                                    new ScPair("\u1E9Ca", new ScPair(new ScPair("\u1E9Cintersect", new ScPair("\u1E9Cb", new ScPair("\u1E9Cc", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cmember", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cmember", new ScPair("\u1E9Ca", new ScPair("\u1E9Cc", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cnth", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScPair("\u1E9Ci", new ScNull()))),
                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cexp",
                                    new ScPair("\u1E9Ci", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cj", new ScPair("\u1E9Ck", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ctimes",
                                            new ScPair(
                                                    new ScPair("\u1E9Cexp", new ScPair("\u1E9Ci", new ScPair("\u1E9Cj", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cexp", new ScPair("\u1E9Ci", new ScPair("\u1E9Ck", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cexp",
                                    new ScPair("\u1E9Ci", new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cj", new ScPair("\u1E9Ck", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cexp",
                                            new ScPair(new ScPair("\u1E9Cexp", new ScPair("\u1E9Ci", new ScPair("\u1E9Cj", new ScNull()))), new ScPair("\u1E9Ck", new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Creverse-loop", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair("\u1E9Cappend", new ScPair(new ScPair("\u1E9Creverse", new ScPair("\u1E9Cx", new ScNull())), new ScPair("\u1E9Cy", new ScNull()))),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Creverse-loop", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull()))),
                            new ScPair(new ScPair("\u1E9Creverse", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Ccount-list",
                                    new ScPair("\u1E9Cz", new ScPair(new ScPair("\u1E9Csort-lp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair(
                                                    new ScPair("\u1E9Ccount-list", new ScPair("\u1E9Cz", new ScPair("\u1E9Cx", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Ccount-list", new ScPair("\u1E9Cz", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cc", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cb", new ScPair("\u1E9Cc", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cplus",
                                    new ScPair(
                                            new ScPair("\u1E9Cremainder", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair(
                                                    new ScPair(
                                                            "\u1E9Ctimes",
                                                            new ScPair("\u1E9Cy", new ScPair(new ScPair("\u1E9Cquotient", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                                                    ),
                                                    new ScNull()
                                            )
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cpower-eval",
                                    new ScPair(
                                            new ScPair("\u1E9Cbig-plus1", new ScPair("\u1E9Cl", new ScPair("\u1E9Ci", new ScPair("\u1E9Cbase", new ScNull())))),
                                            new ScPair("\u1E9Cbase", new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair(new ScPair("\u1E9Cpower-eval", new ScPair("\u1E9Cl", new ScPair("\u1E9Cbase", new ScNull()))), new ScPair("\u1E9Ci", new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cpower-eval",
                                    new ScPair(
                                            new ScPair("\u1E9Cbig-plus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScPair("\u1E9Ci", new ScPair("\u1E9Cbase", new ScNull()))))),
                                            new ScPair("\u1E9Cbase", new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair(
                                                    "\u1E9Ci",
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cplus",
                                                                    new ScPair(
                                                                            new ScPair("\u1E9Cpower-eval", new ScPair("\u1E9Cx", new ScPair("\u1E9Cbase", new ScNull()))),
                                                                            new ScPair(new ScPair("\u1E9Cpower-eval", new ScPair("\u1E9Cy", new ScPair("\u1E9Cbase", new ScNull()))), new ScNull())
                                                                    )
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cremainder", new ScPair("\u1E9Cy", new ScPair(1, new ScNull()))),
                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair(new ScPair("\u1E9Cremainder", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cy", new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())), new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cremainder", new ScPair("\u1E9Cx", new ScPair("\u1E9Cx", new ScNull()))),
                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair(new ScPair("\u1E9Cquotient", new ScPair("\u1E9Ci", new ScPair("\u1E9Cj", new ScNull()))), new ScPair("\u1E9Ci", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Ci", new ScNull())), new ScNull())),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cor",
                                                                    new ScPair(
                                                                            new ScPair("\u1E9Czerop", new ScPair("\u1E9Cj", new ScNull())),
                                                                            new ScPair(
                                                                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cj", new ScPair(1, new ScNull()))), new ScNull())),
                                                                                    new ScNull()
                                                                            )
                                                                    )
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair(new ScPair("\u1E9Cremainder", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cx", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())), new ScNull())),
                                                    new ScPair(
                                                            new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                                            new ScPair(
                                                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cpower-eval",
                                    new ScPair(new ScPair("\u1E9Cpower-rep", new ScPair("\u1E9Ci", new ScPair("\u1E9Cbase", new ScNull()))), new ScPair("\u1E9Cbase", new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Ci", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cpower-eval",
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Cbig-plus",
                                                    new ScPair(
                                                            new ScPair("\u1E9Cpower-rep", new ScPair("\u1E9Ci", new ScPair("\u1E9Cbase", new ScNull()))),
                                                            new ScPair(
                                                                    new ScPair("\u1E9Cpower-rep", new ScPair("\u1E9Cj", new ScPair("\u1E9Cbase", new ScNull()))),
                                                                    new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScPair("\u1E9Cbase", new ScNull()))
                                                            )
                                                    )
                                            ),
                                            new ScPair("\u1E9Cbase", new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Ci", new ScPair("\u1E9Cj", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cgcd", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(new ScPair("\u1E9Cgcd", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cnth",
                                    new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))), new ScPair("\u1E9Ci", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cappend",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnth", new ScPair("\u1E9Ca", new ScPair("\u1E9Ci", new ScNull()))),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cnth",
                                                                    new ScPair(
                                                                            "\u1E9Cb",
                                                                            new ScPair(
                                                                                    new ScPair(
                                                                                            "\u1E9Cdifference",
                                                                                            new ScPair("\u1E9Ci", new ScPair(new ScPair("\u1E9Clength", new ScPair("\u1E9Ca", new ScNull())), new ScNull()))
                                                                                    ),
                                                                                    new ScNull()
                                                                            )
                                                                    )
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cdifference",
                                    new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cx", new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cdifference",
                                    new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScPair("\u1E9Cx", new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cdifference",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Ctimes",
                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cc", new ScPair("\u1E9Cw", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cdifference",
                                            new ScPair(
                                                    new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cc", new ScPair("\u1E9Cx", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cw", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cremainder",
                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cz", new ScNull()))), new ScPair("\u1E9Cz", new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cdifference",
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Cplus",
                                                    new ScPair("\u1E9Cb", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Ca", new ScPair("\u1E9Cc", new ScNull()))), new ScNull()))
                                            ),
                                            new ScPair("\u1E9Ca", new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cb", new ScPair("\u1E9Cc", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cdifference",
                                    new ScPair(
                                            new ScPair("\u1E9Cadd1", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())),
                                            new ScPair("\u1E9Cz", new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cadd1", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair(
                                            new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cz", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cz", new ScNull())), new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair("\u1E9Cy", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Czerop", new ScPair("\u1E9Cx", new ScNull())), new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cgcd",
                                    new ScPair(
                                            new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cz", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ctimes",
                                            new ScPair("\u1E9Cz", new ScPair(new ScPair("\u1E9Cgcd", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cvalue", new ScPair(new ScPair("\u1E9Cnormalize", new ScPair("\u1E9Cx", new ScNull())), new ScPair("\u1E9Ca", new ScNull()))),
                            new ScPair(new ScPair("\u1E9Cvalue", new ScPair("\u1E9Cx", new ScPair("\u1E9Ca", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Cflatten", new ScPair("\u1E9Cx", new ScNull())),
                                            new ScPair(new ScPair("\u1E9Ccons", new ScPair("\u1E9Cy", new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnlistp", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Clistp", new ScPair(new ScPair("\u1E9Cgopher", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                            new ScPair(new ScPair("\u1E9Clistp", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Csamefringe", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cequal",
                                            new ScPair(
                                                    new ScPair("\u1E9Cflatten", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Cflatten", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Cgreatest-factor", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair(
                                                            "\u1E9Cor",
                                                            new ScPair(
                                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())),
                                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cy", new ScPair(1, new ScNull()))), new ScNull())
                                                            )
                                                    ),
                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(new ScPair("\u1E9Cgreatest-factor", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair(1, new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(1, new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cnumberp",
                                    new ScPair(new ScPair("\u1E9Cgreatest-factor", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cnot",
                                            new ScPair(
                                                    new ScPair(
                                                            "\u1E9Cand",
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cor",
                                                                            new ScPair(
                                                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())),
                                                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cy", new ScPair(1, new ScNull()))), new ScNull())
                                                                            )
                                                                    ),
                                                                    new ScPair(
                                                                            new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                                                            new ScNull()
                                                                    )
                                                            )
                                                    ),
                                                    new ScNull()
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ctimes-list", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Ctimes",
                                            new ScPair(
                                                    new ScPair("\u1E9Ctimes-list", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Ctimes-list", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cprime-list", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cprime-list", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Cprime-list", new ScPair("\u1E9Cy", new ScNull())), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair("\u1E9Cz", new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cw", new ScPair("\u1E9Cz", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cz", new ScNull())),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cor",
                                                                    new ScPair(
                                                                            new ScPair("\u1E9Cequal", new ScPair("\u1E9Cz", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))),
                                                                            new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cw", new ScPair(1, new ScNull()))), new ScNull())
                                                                    )
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cgreatereqp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                            new ScPair(
                                    new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cor",
                                            new ScPair(
                                                    new ScPair("\u1E9Cequal", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cand",
                                                                    new ScPair(
                                                                            new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cx", new ScNull())),
                                                                            new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cy", new ScPair(1, new ScNull()))), new ScNull())
                                                                    )
                                                            ),
                                                            new ScNull()
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cremainder",
                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScPair("\u1E9Cy", new ScNull()))
                            ),
                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))), new ScPair(1, new ScNull()))
                            ),
                            new ScPair(
                                    scList(
                                            "\u1E9Cand",
                                            new ScPair(
                                                    "\u1E9Cnot",
                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Ca", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))), new ScNull())
                                            ),
                                            new ScPair(
                                                    "\u1E9Cnot",
                                                    new ScPair(new ScPair("\u1E9Cequal", new ScPair("\u1E9Cb", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))), new ScNull())
                                            ),
                                            new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Ca", new ScNull())),
                                            new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cb", new ScNull())),
                                            new ScPair(
                                                    "\u1E9Cequal",
                                                    new ScPair(new ScPair("\u1E9Csub1", new ScPair("\u1E9Ca", new ScNull())), new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))
                                            ),
                                            new ScPair(
                                                    "\u1E9Cequal",
                                                    new ScPair(new ScPair("\u1E9Csub1", new ScPair("\u1E9Cb", new ScNull())), new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clessp",
                                    new ScPair(
                                            new ScPair("\u1E9Clength", new ScPair(new ScPair("\u1E9Cdelete", new ScPair("\u1E9Cx", new ScPair("\u1E9Cl", new ScNull()))), new ScNull())),
                                            new ScPair(new ScPair("\u1E9Clength", new ScPair("\u1E9Cl", new ScNull())), new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cmember", new ScPair("\u1E9Cx", new ScPair("\u1E9Cl", new ScNull()))), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Csort2", new ScPair(new ScPair("\u1E9Cdelete", new ScPair("\u1E9Cx", new ScPair("\u1E9Cl", new ScNull()))), new ScNull())),
                            new ScPair(
                                    new ScPair("\u1E9Cdelete", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Csort2", new ScPair("\u1E9Cl", new ScNull())), new ScNull()))),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cdsort", new ScPair("\u1E9Cx", new ScNull())),
                            new ScPair(new ScPair("\u1E9Csort2", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Clength",
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Ccons",
                                                    new ScPair(
                                                            "\u1E9Cx1",
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Ccons",
                                                                            new ScPair(
                                                                                    "\u1E9Cx2",
                                                                                    new ScPair(
                                                                                            new ScPair(
                                                                                                    "\u1E9Ccons",
                                                                                                    new ScPair(
                                                                                                            "\u1E9Cx3",
                                                                                                            new ScPair(
                                                                                                                    new ScPair(
                                                                                                                            "\u1E9Ccons",
                                                                                                                            new ScPair(
                                                                                                                                    "\u1E9Cx4",
                                                                                                                                    new ScPair(
                                                                                                                                            new ScPair(
                                                                                                                                                    "\u1E9Ccons",
                                                                                                                                                    new ScPair(
                                                                                                                                                            "\u1E9Cx5",
                                                                                                                                                            new ScPair(new ScPair("\u1E9Ccons", new ScPair("\u1E9Cx6", new ScPair("\u1E9Cx7", new ScNull()))), new ScNull())
                                                                                                                                                    )
                                                                                                                                            ),
                                                                                                                                            new ScNull()
                                                                                                                                    )
                                                                                                                            )
                                                                                                                    ),
                                                                                                                    new ScNull()
                                                                                                            )
                                                                                                    )
                                                                                            ),
                                                                                            new ScNull()
                                                                                    )
                                                                            )
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            ),
                                            new ScNull()
                                    )
                            ),
                            new ScPair(
                                    new ScPair("\u1E9Cplus", new ScPair(EARLEYBOYER_6, new ScPair(new ScPair("\u1E9Clength", new ScPair("\u1E9Cx7", new ScNull())), new ScNull()))),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cdifference",
                                    new ScPair(
                                            new ScPair("\u1E9Cadd1", new ScPair(new ScPair("\u1E9Cadd1", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                            new ScPair(EARLEYBOYER_2, new ScNull())
                                    )
                            ),
                            new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cquotient",
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Cplus",
                                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                                            ),
                                            new ScPair(EARLEYBOYER_2, new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cquotient", new ScPair("\u1E9Cy", new ScPair(EARLEYBOYER_2, new ScNull()))), new ScNull()))
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Csigma", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScPair("\u1E9Ci", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cquotient",
                                            new ScPair(
                                                    new ScPair("\u1E9Ctimes", new ScPair("\u1E9Ci", new ScPair(new ScPair("\u1E9Cadd1", new ScPair("\u1E9Ci", new ScNull())), new ScNull()))),
                                                    new ScPair(EARLEYBOYER_2, new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cadd1", new ScPair("\u1E9Cy", new ScNull())), new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cy", new ScNull())),
                                                    new ScPair(
                                                            new ScPair("\u1E9Cadd1", new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                                                            new ScPair(new ScPair("\u1E9Cadd1", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(
                                            new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                            new ScPair(new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cz", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                                    new ScPair(
                                                            new ScPair("\u1E9Cnot", new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cy", new ScPair("\u1E9Cz", new ScNull()))), new ScNull())),
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cif",
                                                                            new ScPair(
                                                                                    new ScPair("\u1E9Clessp", new ScPair("\u1E9Cz", new ScPair("\u1E9Cy", new ScNull()))),
                                                                                    new ScPair(
                                                                                            new ScPair(
                                                                                                    "\u1E9Cnot",
                                                                                                    new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScNull())
                                                                                            ),
                                                                                            new ScPair(
                                                                                                    new ScPair(
                                                                                                            "\u1E9Cequal",
                                                                                                            new ScPair(
                                                                                                                    new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())),
                                                                                                                    new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cz", new ScNull())), new ScNull())
                                                                                                            )
                                                                                                    ),
                                                                                                    new ScNull()
                                                                                            )
                                                                                    )
                                                                            )
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cmeaning",
                                    new ScPair(
                                            new ScPair("\u1E9Cplus-tree", new ScPair(new ScPair("\u1E9Cdelete", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())),
                                            new ScPair("\u1E9Ca", new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Cmember", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cdifference",
                                                                    new ScPair(
                                                                            new ScPair(
                                                                                    "\u1E9Cmeaning",
                                                                                    new ScPair(new ScPair("\u1E9Cplus-tree", new ScPair("\u1E9Cy", new ScNull())), new ScPair("\u1E9Ca", new ScNull()))
                                                                            ),
                                                                            new ScPair(new ScPair("\u1E9Cmeaning", new ScPair("\u1E9Cx", new ScPair("\u1E9Ca", new ScNull()))), new ScNull())
                                                                    )
                                                            ),
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cmeaning",
                                                                            new ScPair(new ScPair("\u1E9Cplus-tree", new ScPair("\u1E9Cy", new ScNull())), new ScPair("\u1E9Ca", new ScNull()))
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cadd1", new ScPair("\u1E9Cy", new ScNull())), new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Cnumberp", new ScPair("\u1E9Cy", new ScNull())),
                                                    new ScPair(
                                                            new ScPair(
                                                                    "\u1E9Cplus",
                                                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull()))
                                                            ),
                                                            new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Cnth", new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScPair("\u1E9Ci", new ScNull()))),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Ci", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Clast", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))), new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Clistp", new ScPair("\u1E9Cb", new ScNull())),
                                                    new ScPair(
                                                            new ScPair("\u1E9Clast", new ScPair("\u1E9Cb", new ScNull())),
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cif",
                                                                            new ScPair(
                                                                                    new ScPair("\u1E9Clistp", new ScPair("\u1E9Ca", new ScNull())),
                                                                                    new ScPair(
                                                                                            new ScPair(
                                                                                                    "\u1E9Ccons",
                                                                                                    new ScPair(
                                                                                                            new ScPair("\u1E9Ccar", new ScPair(new ScPair("\u1E9Clast", new ScPair("\u1E9Ca", new ScNull())), new ScNull())),
                                                                                                            new ScPair("\u1E9Cb", new ScNull())
                                                                                                    )
                                                                                            ),
                                                                                            new ScPair("\u1E9Cb", new ScNull())
                                                                                    )
                                                                            )
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cequal",
                                    new ScPair(new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScPair("\u1E9Cz", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Clessp", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))),
                                                    new ScPair(
                                                            new ScPair("\u1E9Cequal", new ScPair(new ScPair("\u1E9Ct", new ScNull()), new ScPair("\u1E9Cz", new ScNull()))),
                                                            new ScPair(new ScPair("\u1E9Cequal", new ScPair(new ScPair("\u1E9Cf", new ScNull()), new ScPair("\u1E9Cz", new ScNull()))), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cassignment",
                                    new ScPair("\u1E9Cx", new ScPair(new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))), new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Cassignedp", new ScPair("\u1E9Cx", new ScPair("\u1E9Ca", new ScNull()))),
                                                    new ScPair(
                                                            new ScPair("\u1E9Cassignment", new ScPair("\u1E9Cx", new ScPair("\u1E9Ca", new ScNull()))),
                                                            new ScPair(new ScPair("\u1E9Cassignment", new ScPair("\u1E9Cx", new ScPair("\u1E9Cb", new ScNull()))), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair("\u1E9Ccar", new ScPair(new ScPair("\u1E9Cgopher", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Clistp", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(
                                                            new ScPair("\u1E9Ccar", new ScPair(new ScPair("\u1E9Cflatten", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cflatten",
                                    new ScPair(new ScPair("\u1E9Ccdr", new ScPair(new ScPair("\u1E9Cgopher", new ScPair("\u1E9Cx", new ScNull())), new ScNull())), new ScNull())
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Clistp", new ScPair("\u1E9Cx", new ScNull())),
                                                    new ScPair(
                                                            new ScPair("\u1E9Ccdr", new ScPair(new ScPair("\u1E9Cflatten", new ScPair("\u1E9Cx", new ScNull())), new ScNull())),
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Ccons",
                                                                            new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull()))
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    )
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cquotient",
                                    new ScPair(new ScPair("\u1E9Ctimes", new ScPair("\u1E9Cy", new ScPair("\u1E9Cx", new ScNull()))), new ScPair("\u1E9Cy", new ScNull()))
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Czerop", new ScPair("\u1E9Cy", new ScNull())),
                                                    new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScPair(new ScPair("\u1E9Cfix", new ScPair("\u1E9Cx", new ScNull())), new ScNull()))
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    "\u1E9Cequal",
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cget",
                                    new ScPair(
                                            "\u1E9Cj",
                                            new ScPair(new ScPair("\u1E9Cset", new ScPair("\u1E9Ci", new ScPair("\u1E9Cval", new ScPair("\u1E9Cmem", new ScNull())))), new ScNull())
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cif",
                                            new ScPair(
                                                    new ScPair("\u1E9Ceqp", new ScPair("\u1E9Cj", new ScPair("\u1E9Ci", new ScNull()))),
                                                    new ScPair("\u1E9Cval", new ScPair(new ScPair("\u1E9Cget", new ScPair("\u1E9Cj", new ScPair("\u1E9Cmem", new ScNull()))), new ScNull()))
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            )
    );
    static ScPair constNboyer = new ScPair(
            new ScPair(
                    "\u1E9Cx",
                    new ScPair(
                            "\u1E9Cf",
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cplus",
                                            new ScPair(
                                                    new ScPair("\u1E9Cplus", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                                    new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cc", new ScPair(new ScPair("\u1E9Czero", new ScNull()), new ScNull()))), new ScNull())
                                            )
                                    ),
                                    new ScNull()
                            )
                    )
            ),
            new ScPair(
                    new ScPair(
                            "\u1E9Cy",
                            new ScPair(
                                    "\u1E9Cf",
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Ctimes",
                                                    new ScPair(
                                                            new ScPair("\u1E9Ctimes", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                                            new ScPair(new ScPair("\u1E9Cplus", new ScPair("\u1E9Cc", new ScPair("\u1E9Cd", new ScNull()))), new ScNull())
                                                    )
                                            ),
                                            new ScNull()
                                    )
                            )
                    ),
                    new ScPair(
                            new ScPair(
                                    "\u1E9Cz",
                                    new ScPair(
                                            "\u1E9Cf",
                                            new ScPair(
                                                    new ScPair(
                                                            "\u1E9Creverse",
                                                            new ScPair(
                                                                    new ScPair(
                                                                            "\u1E9Cappend",
                                                                            new ScPair(
                                                                                    new ScPair("\u1E9Cappend", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                                                                    new ScPair(new ScPair("\u1E9Cnil", new ScNull()), new ScNull())
                                                                            )
                                                                    ),
                                                                    new ScNull()
                                                            )
                                                    ),
                                                    new ScNull()
                                            )
                                    )
                            ),
                            new ScPair(
                                    new ScPair(
                                            "\u1E9Cu",
                                            new ScPair(
                                                    "\u1E9Cequal",
                                                    new ScPair(
                                                            new ScPair("\u1E9Cplus", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                                            new ScPair(new ScPair("\u1E9Cdifference", new ScPair("\u1E9Cx", new ScPair("\u1E9Cy", new ScNull()))), new ScNull())
                                                    )
                                            )
                                    ),
                                    new ScPair(
                                            new ScPair(
                                                    "\u1E9Cw",
                                                    new ScPair(
                                                            "\u1E9Clessp",
                                                            new ScPair(
                                                                    new ScPair("\u1E9Cremainder", new ScPair("\u1E9Ca", new ScPair("\u1E9Cb", new ScNull()))),
                                                                    new ScPair(
                                                                            new ScPair(
                                                                                    "\u1E9Cmember",
                                                                                    new ScPair("\u1E9Ca", new ScPair(new ScPair("\u1E9Clength", new ScPair("\u1E9Cb", new ScNull())), new ScNull()))
                                                                            ),
                                                                            new ScNull()
                                                                    )
                                                            )
                                                    )
                                            ),
                                            new ScNull()
                                    )
                            )
                    )
            )
    );

    public static Object bgLScZa2symbolzd2recordszd2alistza22z00Nboyer;
    public static Object ifConstructorNboyer = "\u1E9C*";
    public static Object falseTermNboyer;
    public static Object trueTermNboyer;
    public static Integer rewriteCountNboyer = 0;
    public static Object unifySubstNboyer = "\u1E9C*";
    public static Function scNumber2string = EarleyBoyer::scNumber2jsstring;

    /*
     ** boyer
     */
    public static Object applySubstLstNboyer(
    	Object alist,
    	Object lst
    )  {
        Object scLst7;
        if (lst instanceof ScNull) {
            return new ScNull();
        }
        scLst7 = ((ScPair) lst).cdr;
        if (scLst7 instanceof ScNull) {
            return new ScPair(applySubstNboyer(alist, ((ScPair) lst).car), new ScNull());
        } else {
            return new ScPair(
            	applySubstNboyer(alist, ((ScPair) lst).car),
                new ScPair(applySubstNboyer(alist, ((ScPair) scLst7).car),applySubstLstNboyer(alist, ((ScPair) scLst7).cdr))
            );
        }
    }
    public static Object rewriteArgsNboyer(
    	Object lst
    ) {
        Object scLst14;
        if (lst instanceof ScNull) {
            return new ScNull();
        }
        Object ranCar = rewriteNboyer(((ScPair) lst).car);
        scLst14 = (( ScPair) lst).cdr;
        if (scLst14 instanceof ScNull) {
            return new ScPair(ranCar, new ScNull());
        }
        return new ScPair(ranCar,new ScPair(rewriteNboyer((( ScPair) scLst14).car), rewriteArgsNboyer((( ScPair) scLst14).cdr)));
    }
    public static Object translateAlistNboyer(
    	Object alist
    ) {
        //debugLog("This is translateAlistNboyer");
        Object scAlist6;
        Object term;
        Object carValue;
        if (alist instanceof ScNull) {
            return new ScNull();
        }
        term = ((ScPair)((ScPair) alist).car).cdr;
        scAlist6 = ((ScPair) alist).cdr;
        if (!(term instanceof ScPair)) {
            carValue = new ScPair(((ScPair) ((ScPair) alist).car).car, term);
        } else {
            carValue = new ScPair(
            	((ScPair) ((ScPair) alist).car).car,
                new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer(((String) ((ScPair) term).car)), translateArgsNboyer(((ScPair) term).cdr))
            );
        }
        if (scAlist6 instanceof ScNull) {
            return new ScPair(carValue, new ScNull());
        } else {
            return new ScPair(
            	carValue,
                new ScPair(
                	new ScPair(((ScPair) ((ScPair) scAlist6).car).car, translateTermNboyer(((ScPair) ((ScPair) scAlist6).car).cdr)),
                    translateAlistNboyer(((ScPair) scAlist6).cdr)
                )
            );
        }
    }
    public static boolean oneWayUnify1Nboyer(
    	Object term1,
        Object term2
    ) {
        Object lst1;
        Object lst2;
        Object tempTemp;
        if (!(term2 instanceof ScPair)) {
            tempTemp = scAssq((term2 instanceof String) ? (String) term2 : ((Integer) term2).toString(),unifySubstNboyer);
            if (((tempTemp instanceof Boolean) ? (Boolean) tempTemp : true) != false) {
                return isTermEqualNboyer(term1, ((ScPair) tempTemp).cdr);
            } else if (scIsNumber(term2)) {
                return scIsEqual(term1, term2);
            } else {
                unifySubstNboyer = new ScPair(new ScPair(term2, term1), unifySubstNboyer);
                return true;
            }
        } else if (!(term1 instanceof ScPair)) {
            return false;
        } else if (((ScPair) term1).car == ((ScPair) term2).car) {
            lst1 = ((ScPair) term1).cdr;
            lst2 = ((ScPair) term2).cdr;
            while (true) {
                if (lst1 instanceof ScNull) {
                    return (lst2 instanceof ScNull);
                } else if (lst2 instanceof ScNull) {
                    return false;
                } else if (oneWayUnify1Nboyer(((ScPair) lst1).car, ((ScPair) lst2).car) != false) {
                    lst1 = ((ScPair) lst1).cdr;
                    lst2 = ((ScPair) lst2).cdr;
                } else {
                    return false;
                }
            }
        } else {
            return false;
        }
    }

    public static Object rewriteNboyer(
		Object term
    ) {
        Object term2;
        Object scTerm12;
        Object lst;
        ScVector symbolRecord;
        Object scLst13;
        rewriteCountNboyer = rewriteCountNboyer + 1;
        if (!(term instanceof ScPair)) {
            return term;
        } else {
            scLst13 = ((ScPair) term).cdr;
            if (scLst13 instanceof ScNull) {
                scTerm12 = new ScPair(((ScPair) term).car, new ScNull());
            } else {
                scTerm12 = new ScPair(((ScPair) term).car, new ScPair(rewriteNboyer(((ScPair) scLst13).car), rewriteArgsNboyer(((ScPair) scLst13).cdr)));
            }
            symbolRecord = ((ScVector) ((ScPair) term).car);
            lst = symbolRecord.arr.get(1);
            while (true) {
                if (lst instanceof ScNull) {
                    return scTerm12;
                } else {
                    term2 = ((ScPair)((ScPair)((ScPair) lst).car).cdr).car;
                    unifySubstNboyer = new ScNull();
                    if (oneWayUnify1Nboyer(scTerm12, term2) != false) {
                        return rewriteNboyer(applySubstNboyer(unifySubstNboyer, ((ScPair)((ScPair)((ScPair)((ScPair) lst).car).cdr).cdr).car));
                    } else {
                        lst = ((ScPair) lst).cdr;
                    }
                }
            }
        }
    }

    public static boolean tautologypNboyer(
    	Object scx1,
        Object trueLst,
        Object falseLsta
    ) {
        //debugLog("This is tautologypNboyer");
        boolean tmp1125;
        Object x;
        boolean tmp1126;
        Object scx8;
        boolean scTmp11259;
        boolean scTmp112610;
        Object scx11;
        Object falseLst;
        scx11 = scx1;
        falseLst = falseLsta;
        while (true) {
            scTmp112610 = isTermEqualNboyer(scx11, trueTermNboyer);
            scTmp11259 = isTermEqualNboyer(scx11, falseTermNboyer);
            if (((scTmp112610 != false) ? scTmp112610 : isTermMemberNboyer(scx11, trueLst)) != false) {
                return true;
            } else if (((scTmp11259 != false) ? scTmp11259 : isTermMemberNboyer(scx11, falseLst)) != false) {
                return  false;
            } else if (!(scx11 instanceof ScPair)) {
                return false;
            } else if (((ScPair) scx11).car == ifConstructorNboyer) {
                scx8 = ((ScPair)((ScPair) scx11).cdr).car;
                tmp1126 = isTermEqualNboyer(scx8, trueTermNboyer);
                x = ((ScPair)((ScPair) scx11).cdr).car;
                tmp1125 = isTermEqualNboyer(x, falseTermNboyer);
                if (((tmp1126 != false) ? tmp1126 : isTermMemberNboyer(scx8, trueLst)) != false) {
                    scx11 = ((ScPair)((ScPair)((ScPair) scx11).cdr).cdr).car;
                } else if (((tmp1125 != false) ? tmp1125 : isTermMemberNboyer(x, falseLst)) != false) {
                    scx11 = ((ScPair)((ScPair)((ScPair)((ScPair) scx11).cdr).cdr).cdr).car;
                } else if (
                        tautologypNboyer(((ScPair) ((ScPair) ((ScPair) scx11).cdr).cdr).car, new ScPair(((ScPair) ((ScPair) scx11).cdr).car, trueLst), falseLst) != false
                ) {
                    falseLst = new ScPair(((ScPair) ((ScPair) scx11).cdr).car, falseLst);
                    scx11 = ((ScPair)((ScPair)((ScPair)((ScPair) scx11).cdr).cdr).cdr).car;
                } else {
                    return  false;
                }
            } else {
                return  false;
            }
        }
    }

    public static boolean bgLSetupzd2Boyerzd2() {
        //debugLog("This is bgLSetupzd2Boyerzd2");
        ScVector symbolRecord;
        ScPair value;
        Object bgLScSymbolzd2record16zd2;
        String sym;
        String scsym17;
        Object term;
        Object lst;
        ScPair scTerm18;
        ScPair scTerm19;
        Object carValue;
        bgLScZa2symbolzd2recordszd2alistza22z00Nboyer = new ScNull();
        ifConstructorNboyer = bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer("\u1E9Cif");
        scTerm19 = new ScPair("\u1E9Cf", new ScNull());
        falseTermNboyer = new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer((String) scTerm19.car), translateArgsNboyer(scTerm19.cdr));
        scTerm18 = new ScPair("\u1E9Ct", new ScNull());
        trueTermNboyer = new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer((String) scTerm18.car), translateArgsNboyer(scTerm18.cdr));
        lst = scConst3Nboyer;
        while (!(lst instanceof ScNull)) {
            term = ((ScPair) lst).car;
            if (( term instanceof ScPair) && (((ScPair) term).car == "\u1E9Cequal") && (((ScPair) ((ScPair) term).cdr).car instanceof ScPair)) {
                scsym17 = ((String)((ScPair)((ScPair)((ScPair) term).cdr).car).car);
                carValue = new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer(((String) ((ScPair) term).car)), translateArgsNboyer(((ScPair) term).cdr));
                sym = (String) ((ScPair)((ScPair)((ScPair) term).cdr).car).car;
                bgLScSymbolzd2record16zd2 = bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer(sym);
                value = new ScPair(carValue, (((ScVector) bgLScSymbolzd2record16zd2).arr.get(1)));
                symbolRecord = ((ScVector) bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer(scsym17));
                symbolRecord.arr.set(1, value);
            } else {
                return  false;
            }
            lst = ((ScPair) lst).cdr;
        }
        return true;
    }

    public static Object bgLTestzd2Boyerzd2(Integer n) {
        //debugLog("This is bgLTestzd2Boyerzd2");
        Object optrOpnd;
        Object term;
        Integer scn20;
        boolean answer;
        Object scTerm21;
        Object scTerm22;
        rewriteCountNboyer = 0;
        term = scConst4Nboyer;
        scn20 = n;
        while (scn20 != 0) {
            term = scList("\u1E9C", term, new ScPair("\u1E9Cf", new ScNull()));
            scn20 -= 1;
        }
        scTerm22 = term;
        if (!(scTerm22 instanceof ScPair)) {
            optrOpnd = scTerm22;
        } else {
            optrOpnd = new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer(((String) ((ScPair) scTerm22).car)), translateArgsNboyer(((ScPair) scTerm22).cdr));
        }
        if (constNboyer == null) {
            scTerm21 = applySubstNboyer(new ScNull(), optrOpnd);
        } else {
            scTerm21 = applySubstNboyer(
            	new ScPair(new ScPair(((ScPair) constNboyer.car).car, translateTermNboyer(((ScPair) constNboyer.car).cdr)), translateAlistNboyer( constNboyer.cdr)),
                optrOpnd
            );
        }
        answer = tautologypNboyer(rewriteNboyer(scTerm21), new ScNull(), new ScNull());
        scWrite(rewriteCountNboyer, new ScNull());
        scDisplay(" rewrites", new ScNull());
        if (answer != false) {
            return rewriteCountNboyer;
        } else {
            return false;
        }
    }

    public static Object warn(Object rewrites) {
        Integer rewritesValue;
        if (scIsNumber(rewrites)) {
            rewritesValue = (Integer) rewrites;
            if (rewritesValue == EARLEYBOYER_95024) {
                return true;
            } else {
                return  false;
            }
        } else {
            return false;
        }
    }

    public static Object run() {
        return bgLTestzd2Boyerzd2(0);
    }

    public static void bgNboyerzd2Benchmarkzd2(String... argumentsAry){
        //debugLog("This is bgNboyerzd2Benchmarkzd2");
        ScPair args = null;
        int sctmp = argumentsAry.length - 1;
        while (sctmp >= 0) {
            args = scCons(argumentsAry[sctmp], (args == null) ? new ScNull() : args);
            sctmp -= 1;
        }
        Object n = (args == null) ? 0 : args.car;
        bgLSetupzd2Boyerzd2();
        runBenchmark("boyer" + scNumber2string.apply(n), 1, EarleyBoyer::run, EarleyBoyer::warn);
    }

    /**
     earley
     */
    public static Function bgLMakezd2Parserzd2(
    	ScPair grammar,
        Function lexer)
    {
        //debugLog("This is bgLMakezd2Parserzd2");
        int i;
        Object[] parserDescr;
        final BiFunction[] defLoop = new BiFunction[1];
        int nbNts;
        ScVector names;
        ScVector steps;
        ScVector predictors;
        ScVector enders;
        ScVector starters;
        ArrayList<String> nts;
        ScVector scNames1;
        ScVector scSteps2;
        ScVector scPredictors3;
        ScVector scEnders4;
        ScVector scStarters5;
        int nbConfs;
        final  BiFunction[] bgLScDefzd2Loop6zd2 = new BiFunction[1];
        int bgLScNbzd2nts7zd2;
        ArrayList scNts8;
        final  BiFunction[] bgLScDefzd2Loop9zd2 = new BiFunction[1];
        bgLScDefzd2Loop9zd2[0] = (
            defs,
            scNts11
        ) -> {
            //debugLog("This is bgLScDefzd2Loop9zd2");
            final BiFunction[] ruleLoop = new BiFunction[1];
            Object head;
            ScPair def;
            if (defs instanceof ScPair) {
                def = (ScPair)((ScPair) defs).car;
                head = def.car;
                ruleLoop[0] = (rules, scNts2) -> {
                    Object nt;
                    Object l;
                    Object scNts13;
                    Object rule;
                    if ( rules instanceof ScPair) {
                        rule = ((ScPair)rules).car;
                        l = rule;
                        scNts13 = scNts2;
                        while (l instanceof ScPair) {
                            nt = ((ScPair) l).car;
                            l = ((ScPair) l).cdr;
                            scNts13 = (Boolean.FALSE.equals(scMember(nt, scNts13)) == false) ? scNts13 : new ScPair(nt, scNts13);
                        }
                        return ruleLoop[0].apply(((ScPair) rules).cdr, scNts13);
                    } else  {
                        return bgLScDefzd2Loop9zd2[0].apply(((ScPair) defs).cdr, scNts2);
                    }
                };
                return ruleLoop[0].apply(def.cdr, (boolean)scMember(head, scNts11) != false ?  scNts11 : new ScPair(head, scNts11));
            } else {
                return scList2vector(scReverse(scNts11)).arr;
            }
        };
        scNts8 = (ArrayList) bgLScDefzd2Loop9zd2[0].apply(grammar, new ScNull());
        bgLScNbzd2nts7zd2 = scNts8.size();
        bgLScDefzd2Loop6zd2[0] = (
            defs,
            bgLScNbzd2confs14zd2
        ) -> {
            //debugLog("This is bgLScDefzd2Loop6zd2");
            final BiFunction[] ruleLoop = new BiFunction[1];
            Object def;



            if (defs instanceof ScPair) {
                def = ((ScPair) defs).car;
                ruleLoop[0] = (rules, 
					bgLScNbzd2confs15zd2) -> {
                    Object l;
                    int bgLScNbzd2confs16zd2;
                    ScPair rule;
                    if (rules instanceof ScPair) {
                        rule = (ScPair) ((ScPair)rules).car;
                        l = rule;
                        bgLScNbzd2confs16zd2 = (int)bgLScNbzd2confs15zd2;
                        while (l instanceof ScPair) {
                            l = ((ScPair) l).cdr;
                            bgLScNbzd2confs16zd2 += 1;
                        }
                        return ruleLoop[0].apply(((ScPair) rules).cdr, bgLScNbzd2confs16zd2 + 1);
                    } else  {
                        return bgLScDefzd2Loop6zd2[0].apply(((ScPair) defs).cdr, bgLScNbzd2confs15zd2);
                    }
                };
                return ruleLoop[0].apply(((ScPair) def).cdr, bgLScNbzd2confs14zd2);
            } else  {
                return bgLScNbzd2confs14zd2;
            }
        };
        nbConfs = (int)bgLScDefzd2Loop6zd2[0].apply(grammar, 0) + bgLScNbzd2nts7zd2;
        scStarters5 = scMakeVector(bgLScNbzd2nts7zd2, new ScNull());
        scEnders4 = scMakeVector(bgLScNbzd2nts7zd2, new ScNull());
        scPredictors3 = scMakeVector(bgLScNbzd2nts7zd2, new ScNull());
        scSteps2 = scMakeVector(nbConfs, false);
        scNames1 = scMakeVector(nbConfs, false);
        nts = scNts8;
        starters = scStarters5;
        enders = scEnders4;
        predictors = scPredictors3;
        steps = scSteps2;
        names = scNames1;
        nbNts = scNts8.size();
        i = nbNts - 1;
        while (i >= 0) {
            scSteps2.arr.set(i, i - nbNts);
            scNames1.arr.set(i, scList(scNts8.get(i), 0));
            scEnders4.arr.set(i, scList(i));
            i -= 1;
        }
        defLoop[0] = (
            defs,
            conf
        ) -> {
            //debugLog("This is defLoop");
            final TriFunction[] ruleLoop = new TriFunction[1];
            String head;
            ScPair def;
            if (defs instanceof ScPair) {
                def = (ScPair) ((ScPair) defs).car;
                head = (String) def.car;
                ruleLoop[0] = (
                    rules,
                    conf1,
                    ruleNum
                ) -> {
                    int i1;
                    int sci17;
                    String nt;
                    Object l;
                    int scConf18;
                    int sci19;
                    ScPair rule;
                    if (rules instanceof ScPair) {
                        rule = (ScPair) ((ScPair)rules).car;
                        names.arr.set((int)conf1, scList(head, ruleNum));
                        sci19 = (int)ind(head, nts);
                        starters.arr.set(sci19, new ScPair(conf1, starters.arr.get(sci19)));
                        l = rule;
                        scConf18 = (int)conf1;
                        while (l instanceof ScPair) {
                            nt = (String) (((ScPair) l).car);
                            steps.arr.set(scConf18, ind(nt, nts));
                            sci17 = (int)ind(nt, nts);
                            predictors.arr.set(sci17, new ScPair(scConf18, predictors.arr.get(sci17)));
                            l = ((ScPair)l).cdr;
                            scConf18 += 1;
                        }
                        steps.arr.set(scConf18, (int)(ind(head, nts)) - nbNts);
                        i1 = (int)ind(head, nts);
                        enders.arr.set(i1, new ScPair(scConf18, enders.arr.get(i1)));
                        return ruleLoop[0].apply(
                        	((ScPair)rules).cdr,
                            scConf18 + 1,
                            (int)ruleNum + 1
                        );
                    } else  {
                        return defLoop[0].apply(((ScPair) defs).cdr, conf);
                    }
                };
                return  ruleLoop[0].apply(def.cdr, conf, 1);
            } else {
                return  new ScNull();
            }
        };

        defLoop[0].apply(grammar, scNts8.size());
        parserDescr = new Object[]{lexer, scNts8, scStarters5, scEnders4, scPredictors3, scSteps2, scNames1};
        return (input) -> {
            //debugLog("This is input");
            Object optrOpnd;
            ScPair scOptrOpnd20;
            ScPair scOptrOpnd21;
            ScPair scOptrOpnd22;
            final ZeroFunction[] loop1 = new ZeroFunction[1];
            ScVector[] bgLScStateza223za2 = new ScVector[1];
            ScVector toks;
            int[] bgLScNbzd2nts24zd2 = new int[1];
            ScVector[] scSteps25 = new ScVector[1];
            ScVector[] scEnders26 = new ScVector[1];
            int[] stateNum = new int[1];
            ScVector[] bgLScStatesza227za2 = new ScVector[1];
            ScVector[] states = new ScVector[1];
            int i2;
            int conf;
            Object l;
            Object tokNts;
            int sci28;
            Object sci29;
            ScPair l1;
            ScPair l2;
            ScPair tok;
            ScPair tail1129;
            Object L1125;
            ScPair goalEnders;
            ScVector bgLScStatesza230za2;
            int bgLScNbzd2nts31zd2;
            int bgLScNbzd2confs32zd2;
            int nbToks;
            ScPair goalStarters;
            ScVector scStates33;
            int bgLScNbzd2confs34zd2;
            int bgLScNbzd2toks35zd2;
            ScVector scToks36;
            ScPair falseHead1128;
            ScVector scNames37;
            ScVector scSteps38;
            ScVector scPredictors39;
            ScVector scEnders40;
            ScVector scStarters41;
            ArrayList<String> scnts42;
            final BiFunction[] makeStates = new BiFunction[1];
            TriFunction[] bgLScConfzd2setzd2getza244za2 = new TriFunction[1];
            Function[] confSetMergeNewBang = new Function[1];
            final QuadFunction[] confSetAdjoin = new QuadFunction[1];
            final QuadFunction[] bgLScConfzd2setzd2adjoinza245za2 = new QuadFunction[1];
            final PentaFunction[] bgLScConfzd2setzd2adjoinza2za246z00 = new PentaFunction[1];
            final QuadFunction[] confSetUnion = new QuadFunction[1];
            final SevenFunction[] forw = new SevenFunction[1];

            makeStates[0] = (bgLScNbzd2toks50zd2, bgLScNbzd2confs51zd2) -> {
                //debugLog("This is makeStates");
                ScVector v;
                int i1;
                ScVector scStates52;
                scStates52 = scMakeVector(((int) bgLScNbzd2toks50zd2) + 1, false);
                i1 = (int)bgLScNbzd2toks50zd2;
                while (i1 >= 0) {
                    v = scMakeVector((int)bgLScNbzd2confs51zd2 + 1, false);
                    v.arr.set(0, -1);
                    scStates52.arr.set(i1, v);
                    i1 -= 1;
                };
                return scStates52;
            };
            bgLScConfzd2setzd2getza244za2[0] = (state, bgLScStatezd2num53zd2, scConf54) -> {
                ScVector confSet;
                Object bgLScConfzd2set55zd2;
                bgLScConfzd2set55zd2 = ((ScVector)state).arr.get((int)scConf54 + 1);
                if (Boolean.FALSE.equals(bgLScConfzd2set55zd2) == false) {
                    return (ScVector)bgLScConfzd2set55zd2;
                } else {
                    confSet = scMakeVector( (int)bgLScStatezd2num53zd2 + EARLEYBOYER_6, false);
                    confSet.arr.set(1, -3);
                    confSet.arr.set(EARLEYBOYER_2, -1);
                    confSet.arr.set(EARLEYBOYER_3, -1);
                    confSet.arr.set(EARLEYBOYER_4, -1);
                    ((ScVector)state).arr.set((int)scConf54 + 1, confSet);
                    return confSet;
                }
            };
            confSetMergeNewBang[0] = (confSet) -> {
                ((ScVector)confSet).arr.set((int)(((ScVector)confSet).arr.get(1)) + EARLEYBOYER_5, ((ScVector)confSet).arr.get(EARLEYBOYER_4));
                ((ScVector)confSet).arr.set(1, ((ScVector)confSet).arr.get(EARLEYBOYER_3));
                ((ScVector)confSet).arr.set(EARLEYBOYER_3, -1);
                return ((ScVector)confSet).arr.set(EARLEYBOYER_4, -1);
            };
            confSetAdjoin[0] = (
            	state,
                confSet,
                scConf56,
                i1
            ) -> {
                int tail = (int)((ScVector)confSet).arr.get(EARLEYBOYER_3);
                ((ScVector)confSet).arr.set((int)i1 + EARLEYBOYER_5, -1);
                ((ScVector)confSet).arr.set(tail + EARLEYBOYER_5, i1);
                ((ScVector)confSet).arr.set(EARLEYBOYER_3, i1);
                if (tail < 0) {
                    ((ScVector)confSet).arr.set(0, ((ScVector)state).arr.get(0));
                    ((ScVector)state).arr.set(0, scConf56);
                    return scConf56;
                } else {
                    return new ScNull();
                }
            };
            bgLScConfzd2setzd2adjoinza245za2[0] = (
            	scStates57,
                bgLScStatezd2num58zd2,
                l4,
                i3
            ) -> {
                //debugLog("This is bgLScConfzd2setzd2adjoinza245za2");
                ScVector confSet;
                int scConf59;
                Object l5;
                ScVector state;
                state = (ScVector)((ScVector)scStates57).arr.get((int)bgLScStatezd2num58zd2);
                l5 = l4;
                while (l5 instanceof ScPair) {
                    scConf59 = (int)((ScPair)l5).car;
                    confSet = (ScVector)bgLScConfzd2setzd2getza244za2[0].apply(state, bgLScStatezd2num58zd2, scConf59);
                    if (Boolean.FALSE.equals(confSet.arr.get((int)i3 + EARLEYBOYER_5)) == true) {
                        confSetAdjoin[0].apply(state, confSet, scConf59, i3);
                        l5 = ((ScPair)l5).cdr;
                    } else {
                        l5 = ((ScPair)l5).cdr;
                    }
                }
                return new ScNull();
            };
            bgLScConfzd2setzd2adjoinza2za246z00[0] = (
            	scStates60,
                bgLScStatesza261za2,
                bgLScStatezd2num62zd2,
                scConf63,
                i1
            ) -> {
                ScVector bgLScConfzd2setza264z70;
                ScVector bgLScStateza265za2;
                Object confSet;
                ScVector state = (ScVector)((ScVector)scStates60).arr.get((int)bgLScStatezd2num62zd2);
                confSet = state.arr.get((int)scConf63 + 1);
                if (Boolean.FALSE.equals((Boolean.FALSE.equals(confSet) == false ? (((ScVector)confSet).arr.get((int)i1+EARLEYBOYER_5)) : false)) == false) {
                    bgLScStateza265za2 = (ScVector)(((ScVector)bgLScStatesza261za2).arr.get((int)bgLScStatezd2num62zd2));
                    bgLScConfzd2setza264z70 = (ScVector)bgLScConfzd2setzd2getza244za2[0].apply(bgLScStateza265za2 , bgLScStatezd2num62zd2, scConf63);
                    Object result = ((Boolean.FALSE.equals(bgLScConfzd2setza264z70.arr.get((int) i1 + EARLEYBOYER_5)) != false) ? confSetAdjoin[0].apply(bgLScStateza265za2, bgLScConfzd2setza264z70, scConf63, i1) :new ScNull());
                    return true;
                } else {
                    return false;
                }
            };
            confSetUnion[0] = (
            	state,
                confSet,
                scConf66,
                otherSet
            ) -> {
                //debugLog("This is confSetUnion");
                Object i6 = ((ScVector)otherSet).arr.get(EARLEYBOYER_2);
                while ((int)i6  >= 0) {
                    if (Boolean.FALSE.equals(((ScVector)confSet).arr.get((int) i6 + EARLEYBOYER_5)) == true) {
                        confSetAdjoin[0].apply(state, confSet, scConf66, (int)i6);
                        i6 = ((ScVector)otherSet).arr.get((int) i6 + EARLEYBOYER_5);
                    } else {
                        i6 = ((ScVector)otherSet).arr.get((int) i6 + EARLEYBOYER_5);
                    }
                }
                return new ScNull();
            };
            forw[0] = (
            	scStates67,
                bgLScStatezd2num68zd2,
                scStarters69,
                scEnders70,
                scPredictors71,
                scSteps72,
                scNts73
            ) -> {
                //debugLog("This is forw");
                ScVector nextSet;
                int next;
                Object confSet;
                int ender;
                Object l3;
                ScVector starterSet;
                int starter;
                Object scl74;
                final Function[] scLoop175 = new Function[1];
                int[] head = new int[1];
                ScVector[] bgLScConfzd2set76zd2 = new ScVector[1];
                int[] bgLScStatezd2num77zd2 = new int[1];
                ScVector[] state = new ScVector[1];
                ScVector[] scStates78 = new ScVector[1];
                ScPair preds;
                ScVector bgLScConfzd2set79zd2;
                int step;
                int scConf80;
                int bgLScNbzd2nts81zd2;
                ScVector scState82;
                scState82 = (ScVector)((ScVector)scStates67).arr.get((int)bgLScStatezd2num68zd2);
                bgLScNbzd2nts81zd2 = ((ArrayList)scNts73).size();
                while (true) {
                    scConf80 = (int)scState82.arr.get(0);
                    if (scConf80 >= 0) {
                        step = (int)((ScVector)scSteps72).arr.get(scConf80);
                        bgLScConfzd2set79zd2 = (ScVector)(scState82.arr.get((int)scConf80 + 1));
                        head[0] = (int)bgLScConfzd2set79zd2.arr.get(EARLEYBOYER_4);
                        scState82.arr.set(0, bgLScConfzd2set79zd2.arr.get(0));
                        confSetMergeNewBang[0].apply(bgLScConfzd2set79zd2);
                        if (step >= 0) {
                            scl74 = ((ScVector)scStarters69).arr.get(step);
                            while (scl74 instanceof ScPair) {
                                starter = (int)((ScPair)scl74).car;
                                starterSet = (ScVector) bgLScConfzd2setzd2getza244za2[0].apply(scState82, bgLScStatezd2num68zd2, starter);
                                if (Boolean.FALSE.equals(starterSet.arr.get((int)bgLScStatezd2num68zd2 + EARLEYBOYER_5)) == true) {
                                    confSetAdjoin[0].apply(scState82, starterSet, starter, bgLScStatezd2num68zd2);
                                    scl74 = ((ScPair)scl74).cdr;
                                } else {
                                    scl74 = ((ScPair)scl74).cdr;
                                }
                            }
                            l3 = ((ScVector)scEnders70).arr.get(step);
                            while (l3 instanceof ScPair) {
                                ender = (int)((ScPair) l3).car;
                                confSet = scState82.arr.get(ender + 1);
                                if (Boolean.FALSE.equals(((Boolean.FALSE.equals(confSet) == false) ? (((ScVector)confSet).arr.get((int)bgLScStatezd2num68zd2 + EARLEYBOYER_5)):false)) == false) {
                                    next = scConf80 + 1;
                                    nextSet = (ScVector) bgLScConfzd2setzd2getza244za2[0].apply(scState82, bgLScStatezd2num68zd2, next);
                                    confSetUnion[0].apply(scState82, nextSet, next, bgLScConfzd2set79zd2);
                                    l3 = ((ScPair) l3).cdr;
                                } else {
                                    l3 = ((ScPair) l3).cdr;
                                }
                            }
                        } else {
                            preds = (ScPair) ((ScVector) scPredictors71).arr.get(step + bgLScNbzd2nts81zd2);
                            scStates78[0] = (ScVector) scStates67;
                            state[0] = scState82;
                            bgLScStatezd2num77zd2[0] = (int) bgLScStatezd2num68zd2;
                            bgLScConfzd2set76zd2[0] = bgLScConfzd2set79zd2;
                            scLoop175[0] = (
                            	l4
                            ) -> {
                                ScVector scState83;
                                ScVector bgLScNextzd2set84zd2;
                                int scNext85;
                                Object predSet;
                                int i3;
                                int pred;
                                if (l4 instanceof ScPair) {
                                    pred = (int) ((ScPair) l4).car;
                                    i3 = head[0];
                                    while (i3 >= 0) {
                                        scState83 = (ScVector) scStates78[0].arr.get(i3);
                                        predSet = scState83.arr.get(pred + 1);
                                        if (Boolean.FALSE.equals(predSet) == false) {
                                            scNext85 = pred + 1;
                                            bgLScNextzd2set84zd2 = (ScVector) bgLScConfzd2setzd2getza244za2[0].apply(state[0], bgLScStatezd2num77zd2[0], scNext85);
                                            confSetUnion[0].apply(state[0], bgLScNextzd2set84zd2, scNext85, predSet);
                                        }
                                        i3 = (int) bgLScConfzd2set76zd2[0].arr.get(i3 + EARLEYBOYER_5);
                                    }
                                    return scLoop175[0].apply(((ScPair) l4).cdr);
                                } else {
                                    return new ScNull();
                                }
                            };
                            scLoop175[0].apply(preds);
                        }
                    } else {
                        return new ScNull();
                    }
                }
            };

            scnts42 = (ArrayList)parserDescr[1];
            scStarters41 = (ScVector) parserDescr[EARLEYBOYER_2];
            scEnders40 = (ScVector) parserDescr[EARLEYBOYER_3];
            scPredictors39 = (ScVector) parserDescr[EARLEYBOYER_4];
            scSteps38 = (ScVector) parserDescr[EARLEYBOYER_5];
            scNames37 = (ScVector) parserDescr[EARLEYBOYER_6];
            falseHead1128 = new ScPair(new ScNull(), new ScNull());
            L1125 = lexer.apply(input);
            tail1129 = falseHead1128;

            while (!(L1125 instanceof ScNull)) {
                tok = (ScPair)((ScPair)L1125).car;
                Object l3 = tok.cdr;
                Object l4 = new ScNull();
                while (l3 instanceof ScPair) {
                    sci29 = scInd43(((ScPair) l3).car, scnts42);
                    if (Boolean.FALSE.equals(sci29) == false) {
                        l3 = ((ScPair) l3).cdr;
                        l4 = new ScPair(sci29, l4);
                    } else {
                        l3 = ((ScPair) l3).cdr;
                    }
                }
                scOptrOpnd22 = new ScPair(tok.car, scReverse(l4));
                scOptrOpnd21 = new ScPair(scOptrOpnd22, new ScNull());
                tail1129.cdr = scOptrOpnd21;
                tail1129 = (ScPair)tail1129.cdr;
                L1125 = ((ScPair) L1125).cdr;
            }
            scOptrOpnd20 = (ScPair)falseHead1128.cdr;
            scToks36 = scList2vector(scOptrOpnd20);
            bgLScNbzd2toks35zd2 = scToks36.arr.size();
            bgLScNbzd2confs34zd2 = scSteps38.arr.size();
            scStates33 = (ScVector)makeStates[0].apply(bgLScNbzd2toks35zd2 ,bgLScNbzd2confs34zd2);
            goalStarters = (ScPair)scStarters41.arr.get(0);
            bgLScConfzd2setzd2adjoinza245za2[0].apply(scStates33, 0 , goalStarters, 0);
            forw[0].apply(scStates33, 0, scStarters41, scEnders40, scPredictors39, scSteps38, scnts42);
            sci28 = 0;
            while (sci28 < bgLScNbzd2toks35zd2) {
                tokNts = ((ScPair)(scToks36.arr.get(sci28))).cdr;
                bgLScConfzd2setzd2adjoinza245za2[0].apply(scStates33, sci28 + 1, tokNts, sci28);
                forw[0].apply(scStates33, sci28 + 1, scStarters41, scEnders40, scPredictors39, scSteps38, scnts42);
                sci28 += 1;
            }
            nbToks = scToks36.arr.size();
            bgLScNbzd2confs32zd2 = scSteps38.arr.size();
            bgLScNbzd2nts31zd2 = scnts42.size();
            bgLScStatesza230za2 = (ScVector)makeStates[0].apply(nbToks, bgLScNbzd2confs32zd2);
            goalEnders = (ScPair) scEnders40.arr.get(0);
            l = goalEnders;
            while (l instanceof ScPair) {
                conf = (int)((ScPair) l).car;
                bgLScConfzd2setzd2adjoinza2za246z00[0].apply(scStates33, bgLScStatesza230za2, nbToks, conf, 0);
                l = ((ScPair) l).cdr;
            }
            i2 = nbToks;
            while (i2 >= 0) {
                states[0] = scStates33;
                bgLScStatesza227za2[0] = bgLScStatesza230za2;
                stateNum[0] = i2;
                scEnders26[0] = scEnders40;
                scSteps25[0] = scSteps38;
                bgLScNbzd2nts24zd2[0] = bgLScNbzd2nts31zd2;
                toks = scToks36;
                bgLScStateza223za2[0] = (ScVector) bgLScStatesza230za2.arr.get(i2) ;
				loop1[0] = () -> {
                    final Function[] scLoop1127 = new Function[1];
					
					
                    int[] prev = new int[1];
                    ScVector[] bgLScStatesza2128za2 = new ScVector[1];
                    ScVector[] scStates129 = new ScVector[1];
                    int[] j = new int[1];
                    int[] i3 = new  int[1];
                    int sci130;
                    int head;

                    ScVector confSet;
                    int scConf131 = (int) bgLScStateza223za2[0].arr.get(0);
                    if (scConf131 >= 0) {
                        confSet = (ScVector) bgLScStateza223za2[0].arr.get(scConf131 + 1);
                        head = (int)confSet.arr.get(EARLEYBOYER_4);
                        bgLScStateza223za2[0].arr.set(0, confSet.arr.get(0));
                        confSetMergeNewBang[0].apply(confSet);
                        sci130 = head;
                        while (sci130 >= 0) {
                            i3[0] = sci130;
                            j[0] = stateNum[0];
                            scStates129[0] = states[0];
                            bgLScStatesza2128za2[0] = bgLScStatesza227za2[0];
                            prev[0] = scConf131 - 1;
                            if (scConf131 >= bgLScNbzd2nts24zd2[0] && (int)(scSteps25[0].arr.get(prev[0])) >= 0) {
                                scLoop1127[0] = (
                                	paramL
                                ) -> {
                                    int k;
                                    Object enderSet;
                                    ScVector state;
                                    int ender;
                                    Object l4 = paramL;
                                    while (true) {
                                        if (l4 instanceof ScPair) {
                                            ender = (int)((ScPair) l4).car;
                                            state = (ScVector) scStates129[0].arr.get(j[0]);
                                            enderSet = state.arr.get(ender + 1);
                                            if (Boolean.FALSE.equals(enderSet) == false) {
                                                k = (int)((ScVector)enderSet).arr.get(EARLEYBOYER_2);
                                                while (k >= 0) {
                                                    if (k >= i3[0]) {
                                                        if (Boolean.FALSE.equals(bgLScConfzd2setzd2adjoinza2za246z00[0].apply(scStates129[0], bgLScStatesza2128za2[0] , k, prev[0], i3[0])) == false) {
                                                            bgLScConfzd2setzd2adjoinza2za246z00[0].apply(scStates129[0], bgLScStatesza2128za2[0], j[0], ender, k);
                                                        }
                                                    }
                                                    k = (int)((ScVector) enderSet).arr.get(k + EARLEYBOYER_5);
                                                }
                                                return scLoop1127[0].apply(((ScPair) l4).cdr);
                                            } else {
                                                l4 = ((ScPair) l4).cdr;
                                            }
                                        } else {
                                            return new ScNull();
                                        }
                                    }
                                };
                                scLoop1127[0].apply(scEnders26[0].arr.get((int)(scSteps25[0].arr.get(prev[0]))));
                            }
                            sci130 = (int)confSet.arr.get(sci130 + EARLEYBOYER_5);
                        }
                        return loop1[0].apply();
                    } else {
                        return new ScNull();
                    }
                };
                loop1[0].apply();
                i2 -= 1;
            }
            optrOpnd = bgLScStatesza230za2;
            return new Object[]{scnts42, scStarters41, scEnders40, scPredictors39, scSteps38, scNames37, scToks36, optrOpnd, 0, 0, 0};
        };
    }

    public static Object ind(String nt, ArrayList scNts10){
        //debugLog("This is ind");
        int i = scNts10.size() - 1;
        while (true) {
            if (i >= 0) {
                if (scIsEqual(scNts10.get(i), nt)) {
                    return i;
                } else {
                    i -= 1;
                }
            } else {
                return false;
            }
        }
    }

    public static int test(int k) {
        //debugLog("This is test");
        ScPair constEarley = new ScPair(
        	new ScPair(
            	"\u1E9Cs",
                new ScPair(new ScPair("\u1E9Ca", new ScNull()), new ScPair(new ScPair("\u1E9Cs", new ScPair("\u1E9Cs", new ScNull())), new ScNull()))
            ),
            new ScNull()
        );
        Object[] x;
        Function p = null;
        p = bgLMakezd2Parserzd2(constEarley, EarleyBoyer::lexer);
        x = (Object[])p.apply(ScVector2list(scMakeVector(k, "\u1E9Ca")));
        int result = scLength((ScPair) bgLParsezd2ze3treesz31(x, "\u1E9Cs", 0, k));
        return result;
    }

    public static ScPair lexer(Object l) {
        String scx134;
        ScPair falseHead1133 = new ScPair(new ScNull(), new ScNull());
        ScPair tail1134 = falseHead1133;
        Object L1130 = l;
        while (!(L1130 instanceof ScNull)) {
            scx134 = ((ScPair) L1130).car.toString();
            tail1134.cdr = new ScPair(scList(scx134, scx134), new ScNull());
            tail1134 = (ScPair) tail1134.cdr;
            L1130 = ((ScPair) L1130).cdr;
        }
        return (ScPair) falseHead1133.cdr;
    }

    public static ScPair derivTrees(
    	int scConf91,
        int i,
        int j,
        ScVector scEnders92,
        ScVector scSteps93,
        ScVector scNames94,
        ScPair[] scToks95,
        ScVector scStates96,
        int bgLScNbzd2nts97zd2)
    {
        //debugLog("This is derivTrees");
        final BiFunction[] scLoop198 = new BiFunction[1];



        int prev;
        Object name = scNames94.arr.get(scConf91);
        if (Boolean.FALSE.equals(name) == false) {
            if (scConf91 < bgLScNbzd2nts97zd2) {
                return (ScPair) scList(scList(name, scToks95[i].car));
            } else {
                return (ScPair)scList(scList(name));
            }
        } else  {
            prev = scConf91 - 1;
            scLoop198[0] = (
            	l1Param,
                l2Param
            ) -> {
                //debugLog("This is scLoop198");
                final BiFunction[] loop2 = new BiFunction[1];
                Object[] enderSet = new Object[1];
                ScVector state;
                int[] ender = new int[1];
                Object[] l1 = {l1Param};
                Object l2 = l2Param;
                while (true) {
                    if (l1[0] instanceof ScPair) {
                        ender[0] = (int)((ScPair) l1[0]).car;
                        state = (ScVector) scStates96.arr.get(j);
                        enderSet[0] = state.arr.get(ender[0] + 1);
                        if (Boolean.FALSE.equals(enderSet[0]) == false) {
                            loop2[0] = (
                            	paramK,
                                paramL2
                            ) -> {
                                final BiFunction[] loop3 = new BiFunction[1];
                                ScPair enderTrees;
                                ScPair prevTrees;
                                Object confSet;
                                ScVector scState99;
                                int[] k = {(int) paramK};
                                Object l3 = paramL2;
                                while (true) {
                                    if (k[0] >= 0) {
                                        scState99 = (ScVector) scStates96.arr.get(k[0]);
                                        confSet = scState99.arr.get(prev+1);
                                        if (k[0] >= i && Boolean.FALSE.equals(((Boolean.FALSE.equals(confSet) == false) ? ((((ScVector)confSet).arr.get( i + EARLEYBOYER_5))):false)) == false) {
                                            prevTrees = derivTrees(prev, i, k[0],  scEnders92,  scSteps93,  scNames94,  scToks95, scStates96,  bgLScNbzd2nts97zd2);
                                            enderTrees = derivTrees(ender[0], k[0], j, scEnders92,  scSteps93,  scNames94,  scToks95,  scStates96, bgLScNbzd2nts97zd2);
                                            loop3[0] = (
                                            	l4,
                                                l5
                                            ) -> {
                                                Object l6;
                                                Object scL2100;
                                                ScPair enderTree;
                                                if (l4 instanceof ScPair) {
                                                    enderTree = (ScPair)scList(((ScPair) l4).car);
                                                    l6 = prevTrees;
                                                    scL2100 = l5;
                                                    while (l6 instanceof ScPair) {
                                                        scL2100 = new ScPair(scAppend(((ScPair) l6).car, enderTree), scL2100);
                                                        l6 = ((ScPair) l6).cdr;
                                                    }
                                                    return loop3[0].apply(((ScPair) l4).cdr, scL2100);
                                                } else {
                                                    return loop2[0].apply(((ScVector) enderSet[0]).arr.get(k[0] + EARLEYBOYER_5), l5);
                                                }
                                            };
                                            return loop3[0].apply(enderTrees, l3);
                                        } else {
                                            k[0] = (int)((ScVector) enderSet[0]).arr.get(k[0] + EARLEYBOYER_5);
                                        }
                                    } else {
                                        return scLoop198[0].apply(((ScPair) l1[0]).cdr, l3);
                                    }
                                }
                            };
                            return loop2[0].apply(((ScVector) enderSet[0]).arr.get(EARLEYBOYER_2), l2);
                        } else {
                            l1[0] = ((ScPair) l1[0]).cdr;
                        }
                    } else {
                        return l2;
                    }
                }
            };
            return (ScPair) scLoop198[0].apply(scEnders92.arr.get((int)scSteps93.arr.get(prev)), new ScNull());
        }
    }

    public static Object bgLScDerivzd2treesza247z70(
    	String nt,
        int i,
        int j,
        ArrayList<String> scNts101,
        ScVector scEnders102,
        ScVector scSteps103,
        ScVector scNames104,
        ArrayList<ScPair> scToks105,
        ScVector scStates106)
    {
        //debugLog("This is bgLScDerivzd2treesza247z70");
        Object confSet;
        ScVector state;
        int scConf107;
        Object l;
        Object trees;
        int bgLScNbzd2nts108zd2;
        Object bgLScNtza2109za2;
        bgLScNtza2109za2 = scInd43(nt, scNts101);
        if (Boolean.FALSE.equals(bgLScNtza2109za2) == false) {
            bgLScNbzd2nts108zd2 = scNts101.size();
            l = scEnders102.arr.get((int)bgLScNtza2109za2);
            trees = new ScNull();
            while (l instanceof ScPair) {
                scConf107 = (int)((ScPair) l).car;
                state = (ScVector) scStates106.arr.get(j);
                confSet = state.arr.get(scConf107 + 1);

                if (Boolean.FALSE.equals(((Boolean.FALSE.equals(confSet) == false) ? (((ScVector)confSet).arr.get(i + EARLEYBOYER_5)):false)) == false) {
                    l = ((ScPair) l).cdr;
                    trees = scAppend(derivTrees(scConf107, i, j, scEnders102, scSteps103, scNames104, scToks105.toArray(new ScPair[0]), scStates106, bgLScNbzd2nts108zd2), trees);
                } else {
                    l = ((ScPair) l).cdr;
                }
            }
            return trees;
        } else {
            return false;
        }
    }

    public static Object bgLParsezd2ze3treesz31(
    	Object[] parse,
    	String nt,
        int i,
        int j)
    {
        //debugLog("This is bgLParsezd2ze3treesz31");
        ScVector states;
        ArrayList<ScPair> toks;
        ScVector names;
        ScVector steps;
        ScVector enders;
        ArrayList<String> nts;
        nts = (ArrayList) parse[0];
        enders = (ScVector)parse[EARLEYBOYER_2];
        steps = (ScVector)parse[EARLEYBOYER_4];
        names = (ScVector)parse[EARLEYBOYER_5];
        toks = (ArrayList)((ScVector)parse[EARLEYBOYER_6]).arr;
        states = (ScVector)parse[EARLEYBOYER_7];
        return bgLScDerivzd2treesza247z70( nt, i, j, nts, enders, steps, names, toks, states);
    }

    public static Object scInd43(Object nt, ArrayList scNts49) {
        //debugLog("This is scInd43");
        int i = scNts49.size() - 1;
        while (true) {
            if (i >= 0) {
                if (scIsEqual(scNts49.get(i), nt)) {
                    return i;
                } else {
                    i -= 1;
                }
            } else {
                return false;
            }
        }
    }

    public static String scNumber2jsstring(Object x) {
        //debugLog("This is scNumber2jsstring");
        return Integer.toString((Integer) x);
    }

    public static class ScErrorOutputPort {
        void appendJSString(Object s) {
            return;
        }
        void close() {}
    }

    public static final ScErrorOutputPort scDefaultOut = new ScErrorOutputPort();

    public static String scToWriteString(Object o) {
        //debugLog("This is scToWriteString");

        if (o instanceof ScNull) {
            return "()";
        }else if (o instanceof Boolean) {
            if ((boolean)o == true) {
                return "#t";
            }
            return "#f";
        }else if (o instanceof Integer) {
            return o.toString();
        }
        return "";
    }

    public static String scToDisplayString(Object o) {
        //debugLog("This is scToDisplayString");

        if (o instanceof ScNull) {
            return "()";
        } else if (o instanceof Boolean) {
            if ((boolean)o == true) {
                return "#t";
            }
            return "#f";
        }else if (o instanceof Integer) {
            return o.toString();
        }
        return "";
    }

    public static Object scList(Object... args) {
        Object res = new ScNull();
        int i = args.length - 1;
        while (i >= 0) {
            res = new ScPair(args[i], res);
            i -= 1;
        }
        return res;
    }

    public static void scWrite(
        Object o,
        Object p
    ) {
        //debugLog("This is scWrite");

        Object p1 = p;
        if (p1 instanceof ScNull) {
            p1 = scDefaultOut;
        }
        ((ScErrorOutputPort) p1).appendJSString(scToWriteString(o));
    }

    public static void scDisplay(
        Object o,
        Object p
    ) {
        //debugLog("This is scDisplay");

        Object p1 = p;
        if (p1 instanceof ScNull) {
            p1 = scDefaultOut;
        }
        ((ScErrorOutputPort) p1).appendJSString(scToDisplayString(o));
    }

    public static boolean scIsNumber(Object n) {
        return  n instanceof Integer || n instanceof Double || n instanceof Float;
    }

    public static ScPair scCons(
        Object car,
        Object cdr
    ) {
        return new ScPair(car, cdr);
    }

    public static boolean scIsPair(Object p) {
        return (p instanceof ScPair);
    }

    public static boolean scIsPairEqual(
        ScPair p1,
        ScPair p2,
        BiFunction comp
    ) {
        return (((boolean)comp.apply(p1.car, p2.car)) && (boolean)comp.apply(p1.cdr, p2.cdr));
    }

    public static boolean scIsVectorEqual(
        ScVector v1,
        ScVector v2,
        BiFunction comp
    ) {
        if (v1.arr.size() != v2.arr.size()) {
            return false;
        };
        for (int i = 0; i < v1.arr.size(); i++) {
            if (!((boolean) comp.apply(v1.arr.get(i), v2.arr.get(i)))) {
                return false;
            }
        }
        return true;
    }

    public static boolean scIsVector(Object v) {
        return (v instanceof ScVector);
    }

    public static boolean scIsEqual(
        Object o1,
        Object o2
    ) {
        boolean resultAny;
        boolean resultPair;
        boolean resultVector;
        boolean resultString;

        resultString = (o1 instanceof String) && (o2 instanceof String) && ((o1).equals(o2));
        resultAny = o1 == o2;
        resultPair = (scIsPair(o1) && scIsPair(o2) && scIsPairEqual((ScPair) o1, (ScPair) o2, EarleyBoyer::scIsEqual));
        resultVector = (scIsVector(o1) && scIsVector(o2) && scIsVectorEqual((ScVector) o1, (ScVector) o2, EarleyBoyer::scIsEqual));
        if (resultAny || resultPair || resultVector || resultString) {
            return  true;
        } else  {
            return false;
        }
    }

    public static Object scAssq(
        String o,
        Object al
    ) {
        Object aln = al;

        while (!(aln instanceof ScNull)) {
            if (((ScPair)((ScPair)aln).car).car instanceof String && ((ScPair)((ScPair)aln).car).car.equals(o)) {
                return ((ScPair) aln).car;
            }
            aln = ((ScPair) aln).cdr;
        }
        return  false;
    }

    public static Object bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer(
        String sym
    ) {
        //debugLog("This is bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer");
        Object r;
        Object x;
        x = scAssq(sym, bgLScZa2symbolzd2recordszd2alistza22z00Nboyer);
        if (x instanceof ScPair) {
            return ((ScPair) x).cdr;
        } else {
            r = new ScVector(new ArrayList<>() {{
                add(sym);
                add(new ScNull());}
            });
            bgLScZa2symbolzd2recordszd2alistza22z00Nboyer = new ScPair(new ScPair(sym, r), bgLScZa2symbolzd2recordszd2alistza22z00Nboyer);
            return r;
        }
    }

    public static Object translateTermNboyer(
        Object term
    ) {
        //debugLog("This is translateTermNboyer");
        Object lst;
        Object cdrValue;
        if (!(term instanceof ScPair)) {
            return term;
        }
        lst = ((ScPair) term).cdr;
        if (lst instanceof ScNull) {
            cdrValue = new ScNull();
            return new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer((String) ((ScPair) term).car), cdrValue);
        } else {
            return new ScPair(
                bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer((String) ((ScPair) term).car),
                new ScPair(translateTermNboyer(((ScPair) lst).car), translateArgsNboyer(((ScPair) lst).cdr))
            );
        }
    }

    public static Object translateArgsNboyer(
        Object lst
    ) {
        //debugLog("This is translateArgsNboyer");
        Object scLst5;
        Object term;
        Object carValue;
        Object cdrValue;
        if (lst instanceof ScNull) {
            return  new ScNull();
        }
        term = ((ScPair) lst).car;
        carValue = !(term instanceof ScPair) ?
                term :
                new ScPair(bgLScSymbolzd2ze3Symbolzd2Record1ze3Nboyer((String) ((ScPair) term).car), translateArgsNboyer(((ScPair) term).cdr));
        scLst5 = ((ScPair) lst).cdr;
        if (scLst5 instanceof ScNull) {
            cdrValue = new ScNull();
        } else {
            cdrValue = new ScPair(translateTermNboyer(((ScPair) scLst5).car), translateArgsNboyer(((ScPair) scLst5).cdr));
        }
        return new ScPair(carValue, cdrValue);
    }

    public static Object applySubstNboyer(
        Object alist,
        Object term
    ) {
        Object lst;
        Object tempTemp;
        if (!(term instanceof ScPair)) {
            tempTemp = scAssq((term instanceof String) ? (String) term : ((Integer) term).toString(), alist);
            if (tempTemp instanceof ScPair) {
                return ((ScPair) tempTemp).cdr;
            } else {
                return  term;
            }
        } else {
            lst = ((ScPair) term).cdr;
            if (lst instanceof ScNull) {
                return new ScPair(((ScPair) term).car, new ScNull());
            } else {
                return new ScPair(((ScPair) term).car, new ScPair(applySubstNboyer(alist, ((ScPair) lst).car), applySubstLstNboyer(alist, ((ScPair) lst).cdr)));
            }
        }
    }

    public static boolean isTermMemberNboyer(
        Object x,
        Object lst
    ) {
        //debugLog("This is isTermMemberNboyer");
        Object tempLst = lst;
        while (true) {
            if (tempLst instanceof ScNull) {
                return  false;
            } else if ((isTermEqualNboyer(x, ((ScPair)tempLst).car)) != false) {
                return  true;
            } else {
                tempLst = ((ScPair)tempLst).cdr;
            }
        }
    }

    public static boolean isTermEqualNboyer(Object x, Object y) {
        Object lst1;
        Object lst2;
        Object r2;
        Object r1;



        if (x instanceof ScPair) {
            if (y instanceof ScPair) {
                r1 = ((ScPair)x).car;
                r2 = ((ScPair)y).car;
                if ((r1 == r2)) {
                    lst1 = ((ScPair)x).cdr;
                    lst2 = ((ScPair)y).cdr;
                    while (true) {
                        if (lst1 instanceof ScNull) {
                            return lst2 instanceof ScNull;
                        } else if (lst2 instanceof ScNull) {
                            return false;
                        } else if (isTermEqualNboyer(((ScPair)lst1).car, ((ScPair)lst2).car)) {
                            lst1 = ((ScPair)lst1).cdr;
                            lst2 = ((ScPair)lst2).cdr;
                        }  else {
                            return  false;
                        }
                    }
                } else {
                    return false;
                }
            } else {
                return  false;
            }
        } else {
            return scIsEqual(x, y);
        }
    }

    public static Object scMember(
        Object o,
        Object l
    ) {
        Object current = l;

        while (current instanceof ScPair) {
            if (scIsEqual(((ScPair) current).car, o)) {
                return current;
            }
            current = ((ScPair) current).cdr;
        }
        return false;
    };

    public static ScVector scMakeVector(int size, Object fill) {
        ArrayList<Object> nullArr = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            nullArr.add(new ScNull());
        }
        ScVector a = new ScVector(nullArr);
        if (!(fill instanceof ScNull)) {
            int i = 0;
            while (i < a.arr.size()) {
                a.arr.set(i, fill);
                i += 1;
            }
        }
        return a;
    }

    public static Object ScVector2list(ScVector a) {
        Object res = new ScNull();
        int i = a.arr.size() - 1;
        while (i >= 0) {
            res = scCons(a.arr.get(i), res);
            i -= 1;
        }
        return res;
    }

    public static ScVector scList2vector(ScPair l) {
        ScVector a = new ScVector(new ArrayList<>());
        Object list = l;
        while (!(list instanceof ScNull)) {
            a.arr.add(((ScPair)list).car);
            list = ((ScPair)list).cdr;
        }
        return a;
    }

    public static int scLength(ScPair l){
        int res = 0;
        Object l1 = l;
        while (!(l1 instanceof ScNull)) {
            res += 1;
            l1 = ((ScPair)l1).cdr;
        }
        return res;
    }

    public static Object scReverseAppendBang(Object l1, Object l2) {
        Object res = l2;
        Object current = l1;
        while (!(current instanceof ScNull)) {
            Object tmp = res;
            res = current;
            current = ((ScPair) current).cdr;
            ((ScPair)res).cdr = tmp;
        }
        return res;
    }

    public static Object scDualAppend(Object l1, Object l2) {
        if (l1 == null) {
            return l2;
        }
        if (l2 == null) {
            return l1;
        }
        Object rev = scReverse(l1);
        return scReverseAppendBang( rev, l2);
    }

    public static Object scAppend(Object... args) {
        if (args.length == 0) {
            return new ScNull();
        }
        Object res = args[args.length - 1];
        int i = args.length - EARLEYBOYER_2;
        while (i >= 0) {
            res = scDualAppend(args[i], res);
            i -= 1;
        }
        return res;
    }

    public static ScPair scReverse(
        Object l1
    ) {
        Object res = new ScNull();
        Object current = l1;
        while (!(current instanceof ScNull)) {
            res = scCons(((ScPair)current).car, res);
            current = ((ScPair) current).cdr;
        }
        return (ScPair) res;
    }

    public static void bgEarleyzd2Benchmarkzd2(Object... argumentsAry) {
        //debugLog("This is bgEarleyzd2Benchmarkzd2");
        ScPair args = null;
        int sctmp = argumentsAry.length - 1;
        while (sctmp >= 0) {
            args = scCons( argumentsAry[sctmp], args);
            sctmp -= 1;
        }
        int k = (args == null) ? EARLEYBOYER_7:(int) args.car;
        Function warn = (result) -> {
            scDisplay(result, new ScNull());
            scNewline(new ScNull());
            return (int)result == EARLEYBOYER_132;
        };
        ZeroFunction run = () -> {
            return test(k);
        };
        runBenchmark("earley", 1, run, warn);
    }

    public static void scNewline(Object p) {
        Object p1 = p;
        if (p1 instanceof ScNull) {
            // we assume not given
            p1 = new ScErrorOutputPort();
        }
        ((ScErrorOutputPort)p1).appendJSString("\n");
    }

    public static void runBenchmark(
        String name,
        int count,
        ZeroFunction run1,
        Function warn1
    ) {
        //debugLog("This is runBenchmark");
        for ( int i = 0; i < count; i++ ){
            Object result = run1.apply();
            //debugLog("result: " + result);
            if (!(boolean) warn1.apply(result)) {
                return;
            }
        }
    }


    public static class ScVector {
        public ArrayList<Object> arr;
        ScVector(ArrayList<Object> arr) {
            this.arr = arr;
        }
    }

    public static class ArkTools {
        static long getTime() {
            return System.nanoTime();
        };
    }

    public static void debugLog(String str) {
        boolean isLog = true;
        if (isLog) {
            System.out.println(str);
        }
    }
    @FunctionalInterface
    interface ZeroFunction<R> {
        R apply();
    }

    @FunctionalInterface
    interface TriFunction<T, U, V, R> {
        R apply(T t, U u, V v);
    }

    @FunctionalInterface
    interface QuadFunction<T, U, V, W, R> {
        R apply(T t, U u, V v, W w);
    }


    @FunctionalInterface
    interface PentaFunction<T, U, V, X, Y, R> {
        R apply(T t, U u, V v, X x, Y y);
    }

    @FunctionalInterface
    interface SevenFunction<T, U, V, X, Y, Z, A, R> {
        R apply(T t, U u, V v, X x, Y y, Z z, A a);
    }
}



/*
 * @State
 * @Tags Jetstream2
 */
class Benchmark {
    public static void  runIteration() {
        EarleyBoyer.bgEarleyzd2Benchmarkzd2();
        EarleyBoyer.bgNboyerzd2Benchmarkzd2();
    }
    public static void main(String[] args) {
        earleyBoyerRunIteration();
    }
    /*
     *@Benchmark
     */
    public static void earleyBoyerRunIteration() {
        long setupStart = EarleyBoyer.ArkTools.getTime();
        for (int i = 0; i < EarleyBoyer.EARLEYBOYER_120; ++i) {
            runIteration();
        }
        long splayEnd = EarleyBoyer.ArkTools.getTime();
        System.out.println("earley-boyer: ms = " + (splayEnd - setupStart) / 1_000_000.0);
    }
}
